package com.self.service.exception;


import com.self.service.enums.ResultEnum;

public class ConstantException extends RuntimeException {

    private Integer code = -1;

    public ConstantException(ResultEnum resultEnum) {
        this(resultEnum.getCode(),resultEnum.getMsg());
    }

    public ConstantException(Integer code, String msg) {
        super(msg);
        this.code = code;
    }
    public Integer getCode() {
        return code;
    }

}
